package a.j;

import a.c.y;
import a.c.z;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.Stack;

public class ef
  implements cf
{
  private Stack a = new Stack();
  private gf b = null;
  private pg c;
  private z e = new z();
  protected df f;
  private PropertyChangeSupport g = new PropertyChangeSupport(this);
  public static int h;
  
  public ef() {}
  
  public ef(df paramdf)
  {
    this();
    a(paramdf);
  }
  
  public df a()
  {
    return this.f;
  }
  
  public void a(df paramdf)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (this.f != null) {
        b();
      }
    }
    if (!bool)
    {
      if (paramdf != null)
      {
        paramdf.a(this);
        this.f = paramdf;
        this.c = null;
      }
    }
    else
    {
      ze localze = paramdf.e();
      if (((bool) || (localze != null)) && ((localze instanceof pg))) {
        this.c = ((pg)localze);
      }
      if (((bool) || (this.c != null)) && ((bool) || (this.b != null))) {
        c(this.b);
      }
    }
  }
  
  public void b()
  {
    boolean bool = ld.E;
    this.f = null;
    if (((bool) || (this.c != null)) && ((bool) || (this.b != null))) {
      this.c.b(this.b);
    }
  }
  
  public void c()
  {
    c((gf)this.a.pop());
  }
  
  public void a(gf paramgf)
  {
    paramgf.e(true);
    this.a.push(this.b);
    c(paramgf);
  }
  
  public void b(gf paramgf)
  {
    this.a.clear();
    c(paramgf);
  }
  
  protected void c(gf paramgf)
  {
    if (!ld.E)
    {
      if (this.b != null) {
        b(this.c, this.b);
      }
      this.g.firePropertyChange("Mode", this.b, paramgf);
      this.b = paramgf;
    }
    a(this.c, this.b);
  }
  
  public gf d()
  {
    return this.b;
  }
  
  public void d(gf paramgf)
  {
    this.e.b(paramgf);
  }
  
  public void e(gf paramgf)
  {
    this.e.remove(paramgf);
  }
  
  public y e()
  {
    return this.e.h();
  }
  
  public void a(ze paramze)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      b(this.c, this.b);
      if ((paramze instanceof pg))
      {
        this.c = ((pg)paramze);
        if (bool) {
          break label56;
        }
        a(this.c, this.b);
        if (!ld.D) {
          return;
        }
      }
    }
    label56:
    this.c = null;
  }
  
  protected static void a(pg parampg, gf paramgf)
  {
    if (parampg != null)
    {
      if (ld.E) {
        break label16;
      }
      if (paramgf != null) {}
    }
    else
    {
      return;
    }
    label16:
    paramgf.a(parampg);
    parampg.a(paramgf);
  }
  
  protected static void b(pg parampg, gf paramgf)
  {
    if (!ld.E) {
      if (parampg == null) {
        return;
      }
    }
    parampg.b(paramgf);
  }
  
  public void a(PropertyChangeListener paramPropertyChangeListener)
  {
    this.g.addPropertyChangeListener(paramPropertyChangeListener);
  }
  
  public void b(PropertyChangeListener paramPropertyChangeListener)
  {
    this.g.removePropertyChangeListener(paramPropertyChangeListener);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.ef

 * JD-Core Version:    0.7.0.1

 */